import Mock from 'mockjs'

import { loginAccount } from './login'
Mock.mock(/\/login/, 'post', loginAccount)

import loginAPI from './loginAccount'
Mock.mock(/\/getLoginAccount/, 'get', loginAPI.getLoginAccount)
Mock.mock(/\/registerAccount/, 'get', loginAPI.registerAccount)
Mock.mock(/\/modifyPwd/, 'get', loginAPI.modifyPwd)
Mock.mock(/\/getCode/, 'get', loginAPI.getCode)

import followStock from './followStock'
Mock.mock(/\/getFollowStock/, 'get', followStock.getFollowStock)
Mock.mock(/\/updateFollowStock/, 'get', followStock.updateFollowStock)
Mock.mock(/\/getHotStock/, 'get', followStock.getHotStock)

const Random = Mock.Random
// 设置全局延时，没有延时的话，有时候会检测不到数据变化
Mock.setup({
  timeout: '300-600'
})



// 初学mockjs 测试文件
/* Mock.mock('/list',/get|post/i,list);
Mock.mock('/listAdd',/get|post/i,listAdd);
Mock.mock('/listUpdate',/get|post/i,listUpdate);
 */

import tableAPI from './user'
// 管理员管理的用户数据
Mock.mock(/\/user\/listpage/, 'get', tableAPI.getUserList)
Mock.mock(/\/user\/remove/, 'get', tableAPI.deleteUser)
Mock.mock(/\/user\/batchremove/, 'get', tableAPI.batchremove)
Mock.mock(/\/user\/add/, 'get', tableAPI.createUser)
Mock.mock(/\/user\/edit/, 'get', tableAPI.updateUser)
export default Mock


